<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:ui="http://java.sun.com/jsf/facelets">
        <h:head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <title>支出项目</title>
            <script language="javascript">
                function updateCostItem(pcode, pname)
                {
                    window.opener.updateCostItemName(pcode, pname);
                    window.close();
                }
            </script>
        </h:head>
        <h:body>
            <h:form id="costItemList">
                <rich:tree style="width:300px"  selectionType="ajax" toggleType="client" render="costinfo"
                           value="#{coitem.rootNode}"  var="idept" >
                    <rich:treeNode ondblclick="updateCostItem('#{idept.data.code}', '#{idept.data.name}');" >
                        <h:outputText value="[#{idept.data.code}]#{idept.data.name}" />
                    </rich:treeNode>
                </rich:tree>
            </h:form>
        </h:body>
</html>
